//
//  TdkcURLManager.h
//  BaseTdkc
//
//  Created by DavidHuang on 16/7/7.
//  Copyright © 2016年 黄栋炜. All rights reserved.
//

#import <Foundation/Foundation.h>

#define kTdkcPlistName @"TdkcURL.plist"
@class Services,Folders;

typedef void (^ReadUrlSuccessBlock)(NSMutableArray *rootArr, BOOL isLoad);
 typedef void(^ServiceNameBlock)(BOOL isServiceNameExist);
@interface TdkcURLManager : NSObject


//字符串数组
@property (nonatomic, strong) NSMutableArray *folders;

//模型数组
@property (nonatomic, strong) NSMutableArray *services;

//特性图层数组
@property (nonatomic, strong) NSMutableArray *layers;


//TdkcURL配置文件根目录
@property (nonatomic, strong) NSMutableArray *rootArr;


//service 名称数组
@property (nonatomic, strong) NSMutableArray *nameArr;


//目标地图服务层 url
@property (nonatomic, copy) NSString *targetServiceUrl;

//目标地图服务层地图 url 底图
@property (nonatomic, copy) NSString *tileUrl;

/**
 *  tdkc feature服务的第一个 URLStr
 */
@property (nonatomic, copy) NSString *tdkcFeatureServiceURLStr;

/**
 *  tdkc map 服务的第一个 URLStr

 */
@property (nonatomic, copy) NSString *tdkcMapServiceURLStr;



+ (instancetype)sharedTdkcURLManager;

/**
 *
 *  获取 url
 *
 */
- (void)readURL:(ReadUrlSuccessBlock)readUrl;



/**
 *  连接网络才能够使用
 *
 *  @param name                服务名
 *  @param isSeviceNameExist   检测服务名是否存在
 */
- (void)checkServiceName:(NSString *)name isExist:(ServiceNameBlock)isSeviceNameExist ;


/**
 *  TdkcUrlPlist
 *
 *  @return  Plist 文件是否存在
 */
- (BOOL)isTdkcUrlPlistExist;


@end

@interface Services : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *type;

@end
@interface Folders : NSObject

@property (nonatomic, copy) NSString *Utilities;

@end

@interface Layers : NSObject

@property (nonatomic, copy) NSString *id;
@property (nonatomic, copy) NSString *name;

@end


